﻿using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;

/// <summary>
/// sysUpdate 的摘要说明
/// </summary>
public class sysUpdate
{
	public sysUpdate()
	{
		//
		// TODO: 在此处添加构造函数逻辑
		//
	}
    SqlConnection conn = new SqlConnection(ConfigurationManager.AppSettings["Connection"]);
    public int UpdateWorkTime(string OndutyTime, string OffdutyTime)
    {
        int result=0;
        try
        {
            conn.Open();
            SqlCommand comm = new SqlCommand("update WoreTimeSet set OndutyTime='" + OndutyTime + "' and OffdutyTime='" + OffdutyTime + "'");
            result = comm.ExecuteNonQuery();
        }
        catch (Exception ex)
        {
            throw (ex);
        }
        finally
        {
            conn.Close();
        }
        return result;
    }
}
